Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
[Symbol(code)]: 'CLIENT_MISSING_INTENTS' (Discord.js)

This is my code:

    import { Client } from 'discord.js';
    
    const bot = new Client();
    
    bot.on('ready', () => console.log('${bot.user.username} is online'));
    
    bot.login('MyToken');

This is the error i get. I have node 14.17.5 installed.

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
    at Client._validateOptions (C:\Users\jayrc\OneDrive\Documents\Coding\Discord\illuminate\node_modules\discord.js\src\client\Client.js:544:13)
    at new Client (C:\Users\jayrc\OneDrive\Documents\Coding\Discord\illuminate\node_modules\discord.js\src\client\Client.js:73:10)
    at file:///C:/Users/jayrc/OneDrive/Documents/Coding/Discord/illuminate/src/bot.js:3:13
    at ModuleJob.run (internal/modules/esm/module_job.js:170:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5) {
  [Symbol(code)]: 'CLIENT_MISSING_INTENTS'
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Assuming you're using the most recent version (v13) of discord.js, they specify on this page that you need node v16.6 or newer.

More specifically, v13 of discord.js introduced many changes to their client object, one of which was the introduction of intents.

Your bot needs to specify what its intents are within the constructor of the client object, like the getting started example on line 3.

const client = new Client({ intents: [Intents.FLAGS.GUILDS] });

Obviously which intents you need will depend on what your bot does. You can read up on intents on discord's official developer docs.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda